<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=7">
<title>{[$webName]} - 后台管理中心</title>
<link href="/courses/public/admin/css/reset.css" rel="stylesheet" type="text/css">
<link href="/courses/public/admin/css/zh-cn-system.css" rel="stylesheet" type="text/css">
<link href="/courses/public/admin/css/table_form.css" rel="stylesheet" type="text/css">
	<link rel="stylesheet" type="text/css" href="/courses/public/admin/css/style/zh-cn-styles1.css" title="styles1" media="screen">
	<link rel="alternate stylesheet" type="text/css" href="/courses/public/admin/css/style/zh-cn-styles2.css" title="styles2" media="screen" disabled="">
	<link rel="alternate stylesheet" type="text/css" href="/courses/public/admin/css/style/zh-cn-styles3.css" title="styles3" media="screen" disabled="">
    <link rel="alternate stylesheet" type="text/css" href="/courses/public/admin/css/style/zh-cn-styles4.css" title="styles4" media="screen" disabled="">
<script language="javascript" type="text/javascript" src="/courses/public/admin/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="/courses/public/admin/js/admin_common.js"></script>
<script language="javascript" type="text/javascript" src="/courses/public/admin/js/styleswitch.js"></script>
<script type="text/javascript">
	window.focus();
	var pc_hash = 'lqGcyW';
			window.onload = function(){
		var html_a = document.getElementsByTagName('a');
		var num = html_a.length;
		for(var i=0;i<num;i++) {
			var href = html_a[i].href;
			if(href && href.indexOf('javascript:') == -1) {
				if(href.indexOf('?') != -1) {
					html_a[i].href = href+'&pc_hash='+pc_hash;
				} else {
					html_a[i].href = href+'?pc_hash='+pc_hash;
				}
			}
		}

		var html_form = document.forms;
		var num = html_form.length;
		for(var i=0;i<num;i++) {
			var newNode = document.createElement("input");
			newNode.name = 'pc_hash';
			newNode.type = 'hidden';
			newNode.value = pc_hash;
			html_form[i].appendChild(newNode);
		}
	}
	function  addFileHtml()  
	{  
		var  form =document.getElementById('form');  
		var count=0;  
		for(var i=0;i<form.elements.length;i++)  
		{  
		   var name=form.elements[i].name;  
		   if(name.indexOf('image')>-1)  count++;  
		    
		}  
		document.getElementById('filehtml').innerHTML += ' 选择上传文件' + (count+1) +':<input type="file"   name="image['+ count +']" size=40 /> <br><br>';   
	}
</script>
</head>
<body>
<style type="text/css">
	html{_overflow-y:scroll;}
</style>
<form action="__URL__/upload_img" method="post" enctype="multipart/form-data"> 
<div class="explain-col">
	<input value="{[$dir]}" name="dir" type="hidden"/> 
	上传图片(JPG格式):<input type="file" name="img"/>  
	<input type="submit" class="button" name="upload" value="上传" />  
</div>
</form>
<form name="myform" action="__URL__/pic_delete" method="post" onsubmit="checkuid();return false;">
<input value="{[$dir]}" name="dir" type="hidden"/>
<div class="table-list">
<table width="100%" cellspacing="0">
	<thead>
		<tr>
			<th align="left" width="20"><input type="checkbox" value="" id="check_box" onclick="selectall('userid[]');"></th>
			<th align="left" width="200">图片名字</th>
		</tr>
	</thead>
	<tbody>
		<volist name="fileName" id="picName">
		    <tr>
				<td align="left"><input type="checkbox" value="{[$picName]}" name="pic_name[]"></td>
				<td align="left" width="200">{[$picName]}<a href="javascript:pic_look('{[$dir]}','{[$picName]}')"><img src="/courses/public/admin/images/detail.png"></a></td>
		    </tr>
		</volist>
	</tbody>
</table>

<div class="btn">
<label for="check_box">全选/取消</label> <input type="submit" class="button" name="dosubmit" value="删除" onclick="return confirm('您确定要删除吗？')">
</div>

<div id="pages"></div>
</div>
</form>
</div>
<script type="text/javascript">
<!--

function checkuid() {
	var ids='';
	$("input[name='pic_name[]']:checked").each(function(i, n){
		ids += $(n).val() + ',';
	});
	if(ids=='') {
		window.top.art.dialog({content:'请选择图片',lock:true,width:'200',height:'50',time:1.5},function(){});
		return false;
	} else {
		myform.submit(ids);
	}
}

function pic_look(dir,pic_name) {
	window.top.art.dialog({id:'modelinfo'}).close();
	window.top.art.dialog({title:'图片',id:'modelinfo',iframe:'__URL__/pic_look?dir='+dir+'&pic_name='+pic_name,width:'auto',height:'auto'}, function(){});
}

//-->
</script>

</body></html>